import axios from 'axios'
import { shopsUrl } from '../../baseUrl/index'

export default {
  namespaced: true,
  state: {
   
  },
  mutations: {
    
  },
  actions: {
    toSearch({state, commit, dispatch},type){
      return new Promise(function(resolve,reject){
        axios({
            method:'get',
            url:shopsUrl,
            params:{
              transform:1,
              filter:'title,cs,'+type
            }
        })
        .then(res=>{
          console.log(res.data.records)
          resolve(res.data.records)
        })
      })
    }
  },
 
  getters: {}
}
